LassoScript Utility
Basics Browse Detail

[Array->Find]

Tag Link [Array->Find] Category Array
Type Member Source Available No
Support Preferred Version 5.0
Change Unchanged Data Source Any
Output Type Array Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0

Description

[Array->Find] returns an array of elements that match the parameter. Accepts a single parameter of any data type.

If the array contains any pair values, only the first part of the pair is compared with the parameter of the [Array->Find] tag.

If no elements in the array match the parameter to the [Array->Find] tag then an empty array is returned.

Syntax

[Array->(Find: 'Find Value')]

Parameters

Required Parameters
Find Value The value which should be searched for in the array.

Examples

To find an element in an array of pairs:

Use the [Array->Find] tag with the value of the first element of the pairs that should be returned from the array. The following example shows an array of pairs returned from the tag, each of which has a first element of 'John Doe'.

[Var: 'People_Array'=(Array: 'John Doe'='Person One', 'Jane Doe'='Person Two', 'Joe Surname'='Person Three', 'John Doe'='Person Four')]
[Output: $People_Array->(Find: 'John Doe')]

(Array: (Pair: (John Doe)=(Person One), (John Doe)=(Person Four)))

Related Tags

Category Tags

Substitution
[Iterator]
[List]
[Map]
[Pair]
[PriorityQueue]
[Queue]
[ReverseIterator]
[Series]
[Set]
[Stack]
[TreeMap]
Member
[Iterator->AtBegin]
[Iterator->AtBottom]
[Iterator->AtEnd]
[Iterator->AtFarLeft]
[Iterator->AtFarRight]
[Iterator->AtTop]
[Iterator->Backward]
[Iterator->Down]
[Iterator->Forward]
[Iterator->InsertAtCurrent]
[Iterator->Key]
[Iterator->Left]
[Iterator->RemoveCurrent]
[Iterator->Reset]
[Iterator->Right]
[Iterator->Up]
[Iterator->Value]
[List->Contains]
[List->Difference]
[List->Find]
[List->FindPosition]
[List->First]
[List->ForEach]
[List->Get]
[List->Insert]
[List->InsertFirst]
[List->InsertFrom]
[List->InsertLast]
[List->Intersection]
[List->Iterator]
[List->Join]
[List->Last]
[List->Remove]
[List->RemoveAll]
[List->RemoveFirst]
[List->RemoveLast]
[List->Reverse]
[List->ReverseIterator]
[List->Second]
[List->Size]
[List->Sort]
[List->SortWith]
[List->Union]
[Map->Contains]
[Map->Find]
[Map->Get]
[Map->Insert]
[Map->InsertFrom]
[Map->Iterator]
[Map->Keys]
[Map->Remove]
[Map->Removeall]
[Map->Size]
[Map->Values]
[Pair->First]
[Pair->Get]
[Pair->Name]
[Pair->Second]
[Pair->Size]
[Pair->Value]
[PriorityQueue->First]
[PriorityQueue->Get]
[PriorityQueue->Insert]
[PriorityQueue->InsertLast]
[PriorityQueue->Remove]
[PriorityQueue->RemoveFirst]
[PriorityQueue->Size]
[Queue->First]
[Queue->Get]
[Queue->Insert]
[Queue->InsertLast]
[Queue->Remove]
[Queue->RemoveFirst]
[Queue->Size]
[ReverseIterator->AtBegin]
[ReverseIterator->AtBottom]
[ReverseIterator->AtEnd]
[ReverseIterator->AtFarLeft]
[ReverseIterator->AtFarRight]
[ReverseIterator->AtTop]
[ReverseIterator->Backward]
[ReverseIterator->Down]
[ReverseIterator->Forward]
[ReverseIterator->InsertAtCurrent]
[ReverseIterator->Key]
[ReverseIterator->Left]
[ReverseIterator->RemoveCurrent]
[ReverseIterator->Reset]
[ReverseIterator->Right]
[ReverseIterator->Up]
[ReverseIterator->Value]
[Set->Contains]
[Set->Difference]
[Set->Find]
[Set->ForEach]
[Set->Get]
[Set->Insert]
[Set->InsertFrom]
[Set->Intersection]
[Set->Iterator]
[Set->Join]
[Set->Remove]
[Set->RemoveAll]
[Set->ReverseIterator]
[Set->Size]
[Set->Union]
[Stack->First]
[Stack->Get]
[Stack->Insert]
[Stack->InsertFirst]
[Stack->Remove]
[Stack->RemoveFirst]
[Stack->Size]
[TreeMap->Contains]
[TreeMap->Find]
[TreeMap->Get]
[TreeMap->Insert]
[TreeMap->Insertfrom]
[TreeMap->Iterator]
[TreeMap->Keys]
[TreeMap->Remove]
[TreeMap->RemoveAll]
[TreeMap->Size]
[TreeMap->Values]